package com.ra.util;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.espirit.eap.sa.LoginUser;
import com.googlecode.cswish.annotation.cm;

/**
 * 意见反馈
 * 
 * @author colin
 * @date 2015年5月16日
 */
@Entity
public class Feedback {
	
	@cm("处理状态_新增")
	public final static Integer STATUS_ADD = 1;
	
	@cm("处理状态_处理中")
	public final static Integer STATUS_DOING = 2;
	
	@cm("处理状态_已处理")
	public final static Integer STATUS_DONE = 3;
	
	private Integer id;
	
	// 标签：建议，出错，求助
	private String flag;
	
	// 反馈内容
	private String content;
	
	// 邮箱
	private String email; 
	
	// 提出人
	private LoginUser loginUser;
	
	// 意见反馈状态(新增：1；处理中：2；已处理：3)
	private Integer status;
	
	// 回复
	private String replyContent;
	
	// 创建时间
	private Date createTime;

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	public LoginUser getLoginUser() {
		return loginUser;
	}

	public void setLoginUser(LoginUser loginUser) {
		this.loginUser = loginUser;
	}
	
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getReplyContent() {
		return replyContent;
	}

	public void setReplyContent(String replyContent) {
		this.replyContent = replyContent;
	}
	
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}
